$OpenBSD: patch-installer_pluginhandler_py,v 1.5 2015/04/17 04:18:13 ajacoutot Exp $
--- installer/pluginhandler.py.orig	Tue Apr 14 11:53:21 2015
+++ installer/pluginhandler.py	Fri Apr 17 05:53:22 2015
@@ -42,7 +42,7 @@ except ImportError:
         return sha.new(s).hexdigest()
 
 
-PLUGIN_STATE_FILE = '/var/lib/hp/hplip.state'
+PLUGIN_STATE_FILE = '/var/db/hp/hplip.state'
 PLUGIN_FALLBACK_LOCATION = 'http://hplipopensource.com/hplip-web/plugin/'
 
 
@@ -97,11 +97,11 @@ class PluginHandle(object):
             ARCH = 'x86_%d' % BITNESS
 
         if BITNESS == 64:
-            SANELIBDIR = '/usr/lib64/sane'
-            LIBDIR = '/usr/lib64'
+            SANELIBDIR = '${LOCALBASE}/lib/sane'
+            LIBDIR = '${LOCALBASE}/lib'
         else:
-            SANELIBDIR = '/usr/lib/sane'
-            LIBDIR = '/usr/lib'
+            SANELIBDIR = '${LOCALBASE}/lib/sane'
+            LIBDIR = '${LOCALBASE}/lib'
 
         copies = []
 
@@ -236,8 +236,8 @@ class PluginHandle(object):
     def __setPluginConfFile(self):
         home = sys_conf.get('dirs', 'home')
 
-        if os.path.exists('/etc/hp/plugin.conf'):
-            self.__plugin_conf_file = "file:///etc/hp/plugin.conf"
+        if os.path.exists('${SYSCONFDIR}/hp/plugin.conf'):
+            self.__plugin_conf_file = "file://${SYSCONFDIR}/hp/plugin.conf"
 
         elif os.path.exists(os.path.join(home, 'plugin.conf')):
             self.__plugin_conf_file = "file://" + os.path.join(home, 'plugin.conf')
